Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Common: Location: move offset method implem. to header #20846

Conversation

peterbarker
Copy link
Contributor

Saves 160 bytes on CubeOrange

@khancyr
Copy link
Contributor

khancyr commented May 26, 2022

that is odd unless the static offset_latlng() is preventing some optimizations ...

@peterbarker
Copy link
Contributor Author

peterbarker commented May 26, 2022

Great. Saves bytes where we have plenty of space, costs bytes we don't:

Durandal:

Binary Name      Text [B]         Data [B]     BSS (B)        Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  ---------------  -----------  -------------  ----------------------------  -------------------------
blimp            -180 (-0.0140%)  0 (0.0000%)  -4 (-0.0015%)  -180 (-0.0140%)                                  675956
ardusub          -172 (-0.0111%)  0 (0.0000%)  -4 (-0.0015%)  -172 (-0.0111%)                                  416596
ardurover        -148 (-0.0093%)  0 (0.0000%)  4 (+0.0015%)   -148 (-0.0093%)                                  378224
arducopter-heli  -160 (-0.0091%)  0 (0.0000%)  0 (0.0000%)    -160 (-0.0090%)                                  195520
arduplane        -148 (-0.0085%)  0 (0.0000%)  4 (+0.0015%)   -148 (-0.0085%)                                  221592
antennatracker   -172 (-0.0128%)  0 (0.0000%)  4 (+0.0015%)   -172 (-0.0127%)                                  616992
arducopter       -160 (-0.0091%)  0 (0.0000%)  0 (0.0000%)    -160 (-0.0091%)                                  203184

Matek-F405:

 Binary Name      Text [B]       Data [B]     BSS (B)        Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  -------------  -----------  -------------  ----------------------------  -------------------------
blimp            44 (+0.0065%)  0 (0.0000%)  -4 (-0.0031%)  44 (+0.0064%)                                    300780
ardusub          60 (+0.0074%)  0 (0.0000%)  4 (+0.0031%)   60 (+0.0074%)                                    169292
ardurover        72 (+0.0084%)  0 (0.0000%)  0 (0.0000%)    72 (+0.0084%)                                    125920
arducopter-heli  60 (+0.0064%)  0 (0.0000%)  4 (+0.0031%)   60 (+0.0064%)                                     38448
arduplane        68 (+0.0070%)  0 (0.0000%)  4 (+0.0031%)   68 (+0.0070%)                                     11056
antennatracker   48 (+0.0072%)  0 (0.0000%)  0 (0.0000%)    48 (+0.0072%)                                    319032
arducopter       60 (+0.0064%)  0 (0.0000%)  -4 (-0.0031%)  60 (+0.0064%)                                     48928

@peterbarker
Copy link
Contributor Author

Try it again on a late rcompiler

@peterbarker peterbarker deleted the pr/location-remove-cpp-implementation branch May 13, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants